#pragma strict
//////////////////////////////////////////////////////
///建立一个 面.
//////////////////////////////////////////////////////

@MenuItem("Level4/Geometry/Plane")
static function Init(){
	var verts:Vector3[] = [
		Vector3(0,1,0),
		Vector3(1,1,0),
		Vector3(1,0,0),
		Vector3(0,0,0)
	];
	var triangles:int[] = [
		0,1,2,
		2,3,0
	];
	var uvs:Vector2[] = [
		Vector2(0,0),
		Vector2(1,0),
		Vector2(1,1),
		Vector2(0,1)
	];
	var mesh:Mesh = new Mesh();
		mesh.vertices = verts;
		mesh.triangles = triangles;
		mesh.uv = uvs;
		mesh.RecalculateNormals();
	AssetDatabase.CreateAsset(mesh,"Assets/Plane.asset");
	AssetDatabase.Refresh();
}